using System;
using System.Collections;
using CE.Database;
/// <summary>
/// Summary description for UserProfileDB
/// </summary>
/// 
namespace CE.HomeRefinance
{
    public class HFIncomePaymentDB
    {
        public HFIncomePaymentDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(HFIncomePayment incomepayment)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocHFIncomePaymentInsertUpdateSingleItem]";
            
            SortedList _sPara = new SortedList();
            
            #region Parameter
                _sPara.Add("@HFIncomePaymentID", incomepayment.HFIncomePaymentID);
                _sPara.Add("@HFPersonnelID", incomepayment.HFPersonnelId);
                _sPara.Add("@HFID", incomepayment.HFID);
                _sPara.Add("@HFIsMainBorrower", incomepayment.HFIsMainBorrower);
                _sPara.Add("@HFIsFixed", incomepayment.HFIsFixed);
                _sPara.Add("@HFFixedAmount", incomepayment.HFFixedAmount);
                _sPara.Add("@HFIsOtherIncome", incomepayment.HFIsOtherIncome);
                _sPara.Add("@HFOtherAmount", incomepayment.HFOtherAmount);
                _sPara.Add("@HFOtherSource", incomepayment.HFOtherSource);
                _sPara.Add("@HFIsCarLoan", incomepayment.HFIsCarLoan);
                _sPara.Add("@HFCLMonthlyAmount", incomepayment.HFCLMonthlyAmount);
                _sPara.Add("@HFCLFinIns", incomepayment.HFCLFinIns);
                _sPara.Add("@HFCLAmount", incomepayment.HFCLAmount);
                _sPara.Add("@HFCLOutPeriod", incomepayment.HFCLOutPeriod);
                _sPara.Add("@HFIsHomeLoan", incomepayment.HFIsHomeLoan);
                _sPara.Add("@HFHLMonthlyAmount", incomepayment.HFHLMonthlyAmount);
                _sPara.Add("@HFHLFinIns", incomepayment.HFHLFinIns);
                _sPara.Add("@HFHLAmount", incomepayment.HFHLAmount);
                _sPara.Add("@HFHLOutPeriod", incomepayment.HFHLOutPeriod);
                _sPara.Add("@HFIsOtherLoan", incomepayment.HFIsOtherLoan);
                _sPara.Add("@HFOLMonthlyAmount", incomepayment.HFOLMonthlyAmount);
                _sPara.Add("@HFOLFinIns", incomepayment.HFOLFinIns);
                _sPara.Add("@HFOLAmount", incomepayment.HFOLAmount);
                _sPara.Add("@HFOLOutPeriod", incomepayment.HFOLOutPeriod);
                _sPara.Add("@ViewedDetailId", incomepayment.ViewedDetailId);
                _sPara.Add("@Status", incomepayment.Status);
                _sPara.Add("@Info1", incomepayment.Info1);
                _sPara.Add("@Info2", incomepayment.Info2);
                _sPara.Add("@Info3", incomepayment.Info3);
                _sPara.Add("@Info4", incomepayment.Info4);
                _sPara.Add("@Info5", incomepayment.Info5);
                _sPara.Add("@Info6", incomepayment.Info6);
                _sPara.Add("@Info7", incomepayment.Info7);
                _sPara.Add("@Info8", incomepayment.Info8);
                _sPara.Add("@Info9", incomepayment.Info9);
                _sPara.Add("@Info10", incomepayment.Info10);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

        public bool Update()
        {
            return true;
        }

        public bool Delete()
        {
            return true;
        }
        
    }
}